package com.kitty.game.party.model;

import com.kitty.game.bangpai.JoinMemberInfo;
import com.kitty.game.enter.FiedValue;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;

@Getter
@Setter
public class ReqJoinMember {
    private String name;
    private int tao;
    private String familyName;
    private String currTitle;
    private String gid;
    private int time;
    private short level;
    private short polar;
    private byte gender;
    private Long figCap;

    public ReqJoinMember() {}

    public ReqJoinMember(String name, int tao, String familyName, String currTitle, String gid, int time, short level, short polar, byte gender,Long zl) {
        this.name = name;
        this.tao = tao;
        this.familyName = familyName;
        this.currTitle = currTitle;
        this.gid = gid;
        this.time = time;
        this.level = level;
        this.polar = polar;
        this.gender = gender;
        this.figCap = zl;
    }

    public JoinMemberInfo asJoinMemberInfo() {
        JoinMemberInfo joinMemberInfo = new JoinMemberInfo();
        ArrayList<FiedValue> arrayList = new ArrayList<>();
        arrayList.add(new FiedValue(1, 4, name));
        arrayList.add(new FiedValue(38, 3, 0));
        arrayList.add(new FiedValue(20, 3, tao));
        arrayList.add(new FiedValue(81, 4, familyName));
        arrayList.add(new FiedValue(36, 4, currTitle));
        arrayList.add(new FiedValue(305, 4, gid));
        arrayList.add(new FiedValue(811, 3, time));
        arrayList.add(new FiedValue(31, 2, level));
        arrayList.add(new FiedValue(44, 2, polar));
        arrayList.add(new FiedValue(75, 3, 0));
        arrayList.add(new FiedValue(29, 1, gender));
        arrayList.add(new FiedValue(493, 3, figCap));
        joinMemberInfo.setList(arrayList);

        return joinMemberInfo;
    }
}
